package Code.StaticDemo;

import java.util.ArrayList;

public class StudentTest {
    public static void main(String[] args) {

        Student.teacherName ="王恒";

        //创建第一个学生对象
        Student s1 = new Student();
        s1.setName("张三");
        s1.setAge(23);
        s1.setGender("男");
        //s1.teacherName ="王恒";
        System.out.println("s1:"+s1);
        s1.study();
        s1.show();

        //创建第二个学生对象
        Student s2 = new Student();
        s2.setName("李四");
        s2.setAge(24);
        s2.setGender("男");
        System.out.println("s2:"+s2);
        s2.study();
        s2.show();
        Student.method();

        Student s3 =new Student ("王五",28,"男");

        ArrayList<Student> list = new ArrayList<>();
        list.add(s1);
        list.add(s2);
        list.add(s3);

        System.out.println(ListUtil.getAgeMax(list));
    }
}
